from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.


class CustomUser(AbstractUser):
    telephone = models.CharField(verbose_name="手机号", blank=True, null=True, max_length=11, unique=True)
    head = models.ImageField(verbose_name="头像", upload_to='head', default='head/default.png')


class WeiBoUser(models.Model):
    uid = models.CharField(verbose_name="微博用户id", max_length=20)
    cu = models.OneToOneField(verbose_name="网站用户", to=CustomUser, on_delete=models.CASCADE)